-module(ping).
-export([start/1, ping/2]).

ping(0, Pong_Node)->
	{pong, Pong_Node} ! finish,
	io:format("ping finish~n", []);
ping(N, Pong_Node)->
	{pong, Pong_Node} ! {ping, self()},
	receive
		pong->
			io:format("Ping receive pong~n", [])
	end,
	ping(N-1, Pong_Node).
start(Pong_Node)->
	spawn(ping, ping, [3, Pong_Node]).
